package com.edu.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import com.alibaba.fastjson2.annotation.JSONField;

import java.time.LocalDateTime;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class CommentEntity {
    //用户评论
    private int commentId;

    private int userId;

    private int bookId;

    @JSONField(name = "content")
    private String content;

    @JSONField(name = "rating")
    private int rating;

    @JSONField(name = "comment_date", format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime commentDate;
}